using Business.WarehouseAreaManagement;
using Business.WarehouseAreaManagement.Dto;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;

namespace Business.Controllers
{
    [RemoteService]
    [Area("Business")]
    [Route("api/business/WarehouseArea")]
    public class WarehouseAreaController : AbpController
    {
        private readonly IWarehouseAreaAppService _WarehouseAreaAppService;

        public WarehouseAreaController(IWarehouseAreaAppService WarehouseAreaAppService)
        {
            _WarehouseAreaAppService = WarehouseAreaAppService;
        }

        [HttpPost]
        [Route("data-post")]
        public Task<WarehouseAreaDto> DataPost(CreateOrUpdateWarehouseAreaDto input)
        {
            return _WarehouseAreaAppService.DataPost(input);
        }

        [HttpPost]
        [Route("delete")]
        public Task Delete(List<Guid> ids)
        {
            return _WarehouseAreaAppService.Delete(ids);
        }

        [HttpGet]
        [Route("{id}")]
        public Task<WarehouseAreaDto> Get(Guid id)
        {
            return _WarehouseAreaAppService.Get(id);
        }

        [HttpGet]
        public Task<PagedResultDto<WarehouseAreaDto>> GetAll(GetWarehouseAreaInputDto input)
        {
            return _WarehouseAreaAppService.GetAll(input);
        }
    }
}
